package com.lagou.repository;

import com.lagou.pojo.Article;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ArticleRepository extends CrudRepository<Article,Integer> , JpaSpecificationExecutor<Article> {

    @Query(value = "SELECT * from t_article ",nativeQuery = true)
    Page<Article> findByPage(PageRequest of);
}
